package com.bw.produce.controller;

import com.bw.common.core.web.controller.BaseController;
import com.bw.common.core.web.domain.AjaxResult;
import com.bw.common.core.web.page.TableDataInfo;
import com.bw.produce.domain.dto.ProductDTO;
import com.bw.produce.domain.dto.TypeRequest;
import com.bw.produce.domain.vo.ProductVO;
import com.bw.produce.domain.vo.TypeVO;
import com.bw.produce.query.ProductQueryObject;
import com.bw.produce.query.TypeQueryObject;
import com.bw.produce.service.IProductService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * @author lemon
 * @date 2024/11/20 13:04
 **/
@RestController
@RequestMapping("/product")
public class ProductController extends BaseController {

    /*@Autowired
    private IProductService productService;



    *//**
     * 根据参数编号获取详细信息
     *//*
    @GetMapping("/{productId}")
    public AjaxResult getInfo(@PathVariable Long productId) {
        return success(productService.getInfo(productId));
    }

    *//**
     * 获取品牌列表
     *//*
    @GetMapping("/list")
    public TableDataInfo list(ProductQueryObject queryParams){
        startPage();
        List<ProductVO> list = productService.selectProductList(queryParams);
        return getDataTable(list);
    }

    *//**
     * 新增品牌
     *//*
    @PostMapping
    public AjaxResult saveOrUpdate(@Validated @RequestBody ProductDTO productDTO) {
        productService.saveOrUpdate(productDTO);
        return toAjax(true);
    }


    *//**
     * 删除品牌
     *//*
    @DeleteMapping("/{productId}")
    public AjaxResult remove(@PathVariable Long productId) {
        productService.remove(productId);
        return toAjax(true);
    }*/
}
